<?php

namespace addons\sum\controller\supplier;

use addons\sum\controller\Common;
use addons\sum\service\supplier\Supplier as SupplierService;

class Apply extends Common
{

    protected $noNeedLogin = [];
    protected $noNeedRight = ['*'];

    // 发起申请请求
    public function apply()
    {
        $user = auth_user();
        $params = $this->request->only([
           'supplier_name', 'user_name', 'phone', 'image_business_license'
        ]);
        $this->svalidate($params, ".apply");
        $store_service=new SupplierService($user);
        $res=$store_service->apply($params);
        $this->success('申请成功');
    }
}
